# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-networkx
_pkgname=networkx
pkgver=2.2
pkgrel=3
pkgdesc='Python package for creating and manipulating graphs and networks.'
url='https://pypi.org/project/networkx/#files'
arch=('any')
license=('BSD')
depends=('python2' 'python2-decorator')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.zip")
sha512sums=('098e58c5f93c72c789e736102815e2f6388eb34147a674941519ef6f6d6452cc09b76d8523893418cb69df133e7623ea2c62fa51144f598f592ebce0e3e3ccbb')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  rm -rf "$pkgdir/usr/share"
}

